<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="velocity.js">

    <title>Document</title>
</head>
<body>
    <div id="app">
        <button @click="isEditing=!isEditing">切换保存和编辑按钮</button>
        <div>
            <transition name="fade">
                <button v-if="isEditing" key="save">保存</button>
                <button v-else key="edit">编辑</button>
            </transition>
        </div>
        <button @click="isEditing=!isEditing">切换保存和编辑按钮1</button>
        <button v-if="isEditing" key="save1">保存</button>
        <button v-else key="edit1">编辑</button>

</div>
<script src="vue.js"></script>
    <script>
        var vm=new Vue({
            el:"#app",
            data:{
                isFinite:true
            }
        })
    </script>
</body>
</html>